﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CsvOutput.aspx.cs" Inherits="main_comm_CsvDownload" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="../../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../../css/base.css" rel="stylesheet" type="text/css" />

    <script src="../../js/base.js" type="text/javascript" charset="utf-8"></script>

    <script src="../../js/singleeditpoint.js" type="text/javascript" charset="utf-8"></script>

    <script src="../../js/validator.js" type="text/javascript" charset="utf-8"></script>

    <script src="../../js/comm.js" type="text/javascript" charset="utf-8"></script>

    <script src="../../js/common.js" type="text/javascript" charset="utf-8"></script>

    <link href="../../css/css.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../../js/common.js" charset="utf-8"></script>

    <title>
        <asp:Literal ID="title" runat="server" Text="<%$Resources:ResourceAdmin,CSV_OUTPUT%>"></asp:Literal>
    </title>

    <script charset="utf-8" language="javascript" type="text/javascript">
        function isInt()
        {
            if(document.getElementById("rdoB4").checked)
            {
                var go=document.getElementById("txtDataCount").value;
                if(go != "")
                {
                    if(go<1)
                    {
                        alert("导出件数不能小于1");
                        return false;
                    }
                    if(!IsInteger(document.getElementById("txtDataCount").value))
                    {
                        document.getElementById("txtDataCount").focus();
                        alert(document.getElementById("hidIntegerMsg").value);
                        return false;
                    }
                }
                else
                {
                    document.getElementById("txtDataCount").focus();
                    alert(document.getElementById("hidMustInputMsg").value);
                    return false;
                }
            }
            
            var pageSize = document.getElementById("v_hid_pageSize").value;
            var pageStart = document.getElementById("v_hid_pageStart").value;
            var allSize = document.getElementById("v_hid_allSize").value;
            var chkFlg = document.getElementById("v_hid_chkFlg").value;
            var dataCount = document.getElementById("txtDataCount").value;
            var EnFullName = document.getElementById("v_hid_EnName").value;
            var radioBtn = "1";
            if (document.getElementById("rdoB4").checked == true)
            {
                radioBtn = "4";
            }
            else if (document.getElementById("rdoB2").checked == true)
            {
                radioBtn = "2";
            }
            else if (document.getElementById("rdoB3").checked == true)
            {
                radioBtn = "3";
            }
            window.location="Wait.aspx?pageSize=" +pageSize + "&pageStart=" 
                + pageStart + "&allSize=" + allSize + "&chkFlg=" 
                + chkFlg + "&radioBtn=" + radioBtn + "&DataCount=" + dataCount + "&EnFullName=" + EnFullName;
            return false;
        }
    </script>

</head>
<body onload="window.focus();">
    <form id="form1" runat="server">
     <div class="conter_right">
      <div class="sfkr" style="text-align:left"><a href="#">数据导出</a></div>
        <fieldset class="dsadq">
            <legend style="color: #434449">数据导出</legend>
            <table border="0" cellspacing="0" cellpadding="0" style="width: 100%">
               
            <table align="center" cellspacing="0" id="dgProperties" width="100%" height="100%">
                <tr>
                    <td align="left">
                        <asp:RadioButton ID="rdoB1" runat="server" GroupName="rdoBCsv" Text="<%$Resources:ResourceAdmin,OUTPUT_CUR_PAGE %>"
                            Checked ForeColor="#37385A" />
                    </td>
                </tr>
                <tr>
                    <td align="left">
                        <asp:RadioButton ID="rdoB2" runat="server" GroupName="rdoBCsv" Text="<%$Resources:ResourceAdmin,OUTPUT_ALL_PAGE %>"
                            ForeColor="#37385A" />
                    </td>
                </tr>
                <tr>
                    <td align="left">
                        <asp:RadioButton ID="rdoB3" runat="server" GroupName="rdoBCsv" Text="<%$Resources:ResourceAdmin,OUTPUT_CHECKED_PAGE %>"
                            ForeColor="#37385A" />
                    </td>
                </tr>
                <tr>
                    <td align="left">
                        <asp:RadioButton ID="rdoB4" runat="server" GroupName="rdoBCsv" Text="<%$Resources:ResourceAdmin,OUTPUT_PAGE %>"
                            ForeColor="#37385A" />
                        <asp:TextBox ID="txtDataCount" runat="server" Width="50px" onkeypress="if (event.keyCode < 48 || event.keyCode >57) event.returnValue = false;"
                            MaxLength="5"></asp:TextBox>
                        <asp:Label ID="Literal2" runat="server" Text="<%$Resources:ResourceAdmin,COUNT%>"
                            ForeColor="#37385A"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr id="buttonTr">
                    <td align="center">
                        <asp:Button name="cmdCSV" runat="server" Text="<%$Resources:ResourceAdmin,CSV_OUTPUT %>"
                            ID="cmdCSV" CssClass="seaal" OnClientClick="isInt();return false;" />
                        &nbsp;
                        <asp:Button name="cmdClose" ID="cmdClose" CssClass="seaal" runat="server" Text="<%$Resources:Resource,BTN_CLOSE %>"
                            OnClientClick="window.close()" />
                    </td>
                </tr>
                <tr id="imgTr" style="display: none">
                    <td align="center">
                        <img src="../../images/Loading.gif" alt="loading" />
                    </td>
                </tr>
              </table>
              <table id="imgTable" align="center" style="border-width: 0px; border-collapse: collapse;
                    display: none;">
                    <tr>
                        <td align="center">
                            <img src="../../images/Loading.gif" alt="loading" />
                        </td>
                    </tr>
              </table>
                
              <table border="0" cellpadding="0" style=" display:none" cellspacing="0" width="100%" id="radioTable">
                <tr>
                    <td style="width:50px; text-align:right;">
                        <asp:Literal id="Literal3" runat="server" Text="<%$Resources:ResourceAdmin,EXPORT_TYPE%>"></asp:Literal>
                    </td>
                        <td style="text-align:left;">
                        <table border="0" cellpadding="0" cellspacing="0" width="300px">
                            <tr>
                               <td>
                                <asp:RadioButton ID="rdoBCsv" runat="server" GroupName="rdoExportType" Text="<%$Resources:ResourceAdmin,EXPORT_TYPE_CSV %>" Checked ForeColor="#37385A"/>
                                <asp:RadioButton ID="rdoBExcel" runat="server" GroupName="rdoExportType" Text="<%$Resources:ResourceAdmin,EXPORT_TYPE_EXCEL %>"  ForeColor="#37385A"/>
                                <asp:RadioButton ID="rdoBPrint" runat="server" GroupName="rdoExportType" Text="<%$Resources:ResourceAdmin,EXPORT_TYPE_PRINT %>"  ForeColor="#37385A"/>
                               </td>
                            </tr>
                        </table>
                    </td>
                </tr>
             </table>
        
             <asp:HiddenField ID="hidMustInputMsg" runat="server" Value="<%$Resources:ResourceAdmin,MUST_INPUT %>" />
             <asp:HiddenField ID="hidIntegerMsg" runat="server" Value="<%$Resources:ResourceAdmin,VALUE_INTEGER %>" />
                
             <div  style="display:none">
                <input type="hidden" runat="server" name="v_hid_pageSize" id="v_hid_pageSize" />
                <input type="hidden" runat="server" name="v_hid_pageStart" id="v_hid_pageStart" />
                <input type="hidden" runat="server" name="v_hid_allSize" id="v_hid_allSize" />
                <input type="hidden" runat="server" name="v_hid_chkFlg" id="v_hid_chkFlg" />
                <input type="hidden" runat="server" name="v_hid_EnName" id="v_hid_EnName" />
            </div>  
           </table>
        </fieldset>
    </div>
    </form>
</body>
</html>
